Repository navigation
Fix GitLab historical tag pipeline normalization - #5203
Merged
arturcic merged 3 commits intoSep 11, 2026
Merged
Conversation
|
Contributor
|
Thank you @arturcic for your contribution! |
This was referenced Nov 17, 2026
This was referenced Nov 23, 2026
This was referenced Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Provide the canonical
CI_COMMIT_TAGreference throughGitLabCi.GetCurrentTag(), using a newReferenceName.FromTagName()factory to centralize construction from literal tag names. This lets the existing normalization path preserve detached HEAD when the explicitly selected local tag resolves to the checked-out commit, while retaining branch and merge-request selection and fallback discovery. Document GitLab tag identification, historical tag reruns, and the local-tag/HEAD requirements.Related Issue
Resolves #4825
Motivation and Context
Rerunning a historical GitLab tag pipeline after main advances can fail because GitLab advertises pipeline and deployment refs at the same commit as the tag. Supplying the selected tag avoids the ambiguous remote-tip lookup. Tag names, including names containing slashes or a literal
refs/tags/prefix, are preserved when constructing the canonical reference.How Has This Been Tested?
Validated locally on macOS arm64 with .NET SDK 10.0.401 and both managed and libgit2 backends:
1.2.3.git diff --checkpass.The full solution test suite and a live GitLab pipeline were not run.
Checklist